package com.lihuinch.ti4j.chap2.practice;

/**
 * dsadasd
 * @author lihuinch
 * @date 2017/12/29
 */
public class CommonPractice {
    public static void main(String[] args) {
        Test01 test01 = new Test01();
        System.out.println(test01.aChar);
        System.out.println(test01.anInt);
        System.out.println(test01.aDouble);

        Incrementable.increment();
        System.out.println(StaticTest.i);

        OneStaticValue oneStaticValue1 = new OneStaticValue();
        OneStaticValue oneStaticValue2 = new OneStaticValue();
        oneStaticValue1.anInt += 1;
        oneStaticValue2.anInt += 1;
        System.out.println(OneStaticValue.anInt);
    }
}

class Test01 {
    char aChar;

    int anInt;

    double aDouble;
}


class StaticTest {
    static int i = 47;
}

class Incrementable {
    static void increment() { StaticTest.i++; }
}

class OneStaticValue {
    static int anInt = 30;
}